package com.example.javapracticaltraining.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName device_inspection_record
 */
@TableName(value ="device_inspection_record")
@Data
public class DeviceInspectionRecord {
    /**
     * 
     */
    @TableId(value = "inspection_id", type = IdType.AUTO)
    private Integer inspectionId;

    /**
     * 
     */
    @TableField(value = "device_id")
    private Integer deviceId;

    /**
     * 
     */
    @TableField(value = "inspector_id")
    private Integer inspectorId;

    /**
     * 
     */
    @TableField(value = "inspection_date")
    private Date inspectionDate;

    /**
     * 
     */
    @TableField(value = "inspection_result")
    private Object inspectionResult;

    /**
     * 
     */
    @TableField(value = "inspection_details")
    private String inspectionDetails;

    /**
     * 
     */
    @TableField(value = "handling_method")
    private String handlingMethod;

    /**
     * 
     */
    @TableField(value = "next_inspection_date")
    private Date nextInspectionDate;

    /**
     * 
     */
    @TableField(value = "remarks")
    private String remarks;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceInspectionRecord other = (DeviceInspectionRecord) that;
        return (this.getInspectionId() == null ? other.getInspectionId() == null : this.getInspectionId().equals(other.getInspectionId()))
            && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
            && (this.getInspectorId() == null ? other.getInspectorId() == null : this.getInspectorId().equals(other.getInspectorId()))
            && (this.getInspectionDate() == null ? other.getInspectionDate() == null : this.getInspectionDate().equals(other.getInspectionDate()))
            && (this.getInspectionResult() == null ? other.getInspectionResult() == null : this.getInspectionResult().equals(other.getInspectionResult()))
            && (this.getInspectionDetails() == null ? other.getInspectionDetails() == null : this.getInspectionDetails().equals(other.getInspectionDetails()))
            && (this.getHandlingMethod() == null ? other.getHandlingMethod() == null : this.getHandlingMethod().equals(other.getHandlingMethod()))
            && (this.getNextInspectionDate() == null ? other.getNextInspectionDate() == null : this.getNextInspectionDate().equals(other.getNextInspectionDate()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInspectionId() == null) ? 0 : getInspectionId().hashCode());
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getInspectorId() == null) ? 0 : getInspectorId().hashCode());
        result = prime * result + ((getInspectionDate() == null) ? 0 : getInspectionDate().hashCode());
        result = prime * result + ((getInspectionResult() == null) ? 0 : getInspectionResult().hashCode());
        result = prime * result + ((getInspectionDetails() == null) ? 0 : getInspectionDetails().hashCode());
        result = prime * result + ((getHandlingMethod() == null) ? 0 : getHandlingMethod().hashCode());
        result = prime * result + ((getNextInspectionDate() == null) ? 0 : getNextInspectionDate().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", inspectionId=").append(inspectionId);
        sb.append(", deviceId=").append(deviceId);
        sb.append(", inspectorId=").append(inspectorId);
        sb.append(", inspectionDate=").append(inspectionDate);
        sb.append(", inspectionResult=").append(inspectionResult);
        sb.append(", inspectionDetails=").append(inspectionDetails);
        sb.append(", handlingMethod=").append(handlingMethod);
        sb.append(", nextInspectionDate=").append(nextInspectionDate);
        sb.append(", remarks=").append(remarks);
        sb.append("]");
        return sb.toString();
    }
}